package com.app.controller;

import com.app.feign.CalculateApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.io.IOException;

@RestController
public class ConsumerController {

    @Autowired
    CalculateApi calculateApi;

    @RequestMapping("/test")
    public String test() throws IOException {
        Integer result1 = calculateApi.add(1, 2);
        Integer result2 = calculateApi.hehehe(1, 2);
        System.out.println("the result is " + result2);
        return "success";
    }

}
